import React, { Suspense } from "react";
import { Switch, Route, withRouter, Redirect } from "react-router-dom";
import HomePage from "../HomePage";
import AccountMine from "../AccountMine";
import AccountDetails from "../AccountDetails";
import AccountFrozen from "../AccountFrozen";
import AccountCustomer from "../AccountCustomer";
import ApplicationResultQuery from "../ApplicationResultQuery";
import TransactionResultQuery from "../TransactionResultQuery";
import BeneficiaryInformation from "../BeneficiaryInformation";
import Exchange from "../Exchange";
import BatchGlobalPayment from "../BatchGlobalPayment";
import PaymentGlobal from "../PaymentGlobal";
import AccountPasswordSet from "../AccountPasswordSet";
import SetNotificationPath from "../SetNotificationPath";
// import SetSecretKey from "../SetSecretKey";

function ContentMain() {
  return (
    <Suspense>
      <Switch>
        <Route path="/gcps-cusweb/homepage" component={HomePage} />
        <Route path="/gcps-cusweb/account/mine" component={AccountMine} />
        <Route
          path="/gcps-cusweb/account/detailed"
          component={AccountDetails}
        />
        <Route
          path="/gcps-cusweb/account/customer"
          component={AccountCustomer}
        />
        <Route path="/gcps-cusweb/account/frozen" component={AccountFrozen} />
        <Route
          path="/gcps-cusweb/tradingcenter/applyresult"
          component={ApplicationResultQuery}
        />
        <Route
          path="/gcps-cusweb/tradingcenter/result"
          component={TransactionResultQuery}
        />
        <Route
          path="/gcps-cusweb/beneficiary/info"
          component={BeneficiaryInformation}
        />
        <Route
          path="/gcps-cusweb/globalpayment/exchange"
          component={Exchange}
        />
        <Route
          path="/gcps-cusweb/globalpayment/result"
          component={PaymentGlobal}
        />
        <Route
          path="/gcps-cusweb/globalpayment/allresult"
          component={BatchGlobalPayment}
        />
        <Route
          path="/gcps-cusweb/setup/account"
          component={AccountPasswordSet}
        />
        <Route
          path="/gcps-cusweb/setup/route"
          component={SetNotificationPath}
        />
        {/* <Route path="/gcps-cusweb/setup/secretkey" component={SetSecretKey} /> */}
        <Redirect from="/gcps-cusweb" to="/gcps-cusweb/homepage" />
        {/* <Route path="/gcps-cusweb/account" component={ListOne} />
        <Route path="/index" component={Home} /> */}
      </Switch>
    </Suspense>
  );
}
ContentMain = withRouter(ContentMain);
export default ContentMain;
